<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Django 1.4.13 release notes &mdash; Django 1.7.8.dev20150401230226 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.7.8.dev20150401230226',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="Django 1.7.8.dev20150401230226 documentation" href="../index.html" />
    <link rel="up" title="Release notes" href="index.html" />
    <link rel="next" title="Django 1.4.12 release notes" href="1.4.12.html" />
    <link rel="prev" title="Django 1.4.14 release notes" href="1.4.14.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);
</script>


  </head>
  <body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="1.4.14.html" title="Django 1.4.14 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.4.12.html" title="Django 1.4.12 release notes">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="releases-1.4.13">
            
  <div class="section" id="s-django-1-4-13-release-notes">
<span id="django-1-4-13-release-notes"></span><h1>Django 1.4.13 release notes<a class="headerlink" href="#django-1-4-13-release-notes" title="Permalink to this headline">¶</a></h1>
<p><em>May 14, 2014</em></p>
<p>Django 1.4.13 fixes two security issues in 1.4.12.</p>
<div class="section" id="s-caches-may-incorrectly-be-allowed-to-store-and-serve-private-data">
<span id="caches-may-incorrectly-be-allowed-to-store-and-serve-private-data"></span><h2>Caches may incorrectly be allowed to store and serve private data<a class="headerlink" href="#caches-may-incorrectly-be-allowed-to-store-and-serve-private-data" title="Permalink to this headline">¶</a></h2>
<p>In certain situations, Django may allow caches to store private data
related to a particular session and then serve that data to requests
with a different session, or no session at all. This can lead to
information disclosure and can be a vector for cache poisoning.</p>
<p>When using Django sessions, Django will set a <tt class="docutils literal"><span class="pre">Vary:</span> <span class="pre">Cookie</span></tt> header to
ensure caches do not serve cached data to requests from other sessions.
However, older versions of Internet Explorer (most likely only Internet
Explorer 6, and Internet Explorer 7 if run on Windows XP or Windows Server
2003) are unable to handle the <tt class="docutils literal"><span class="pre">Vary</span></tt> header in combination with many content
types. Therefore, Django would remove the header if the request was made by
Internet Explorer.</p>
<p>To remedy this, the special behavior for these older Internet Explorer versions
has been removed, and the <tt class="docutils literal"><span class="pre">Vary</span></tt> header is no longer stripped from the response.
In addition, modifications to the <tt class="docutils literal"><span class="pre">Cache-Control</span></tt> header for all Internet Explorer
requests with a <tt class="docutils literal"><span class="pre">Content-Disposition</span></tt> header have also been removed as they
were found to have similar issues.</p>
</div>
<div class="section" id="s-malformed-redirect-urls-from-user-input-not-correctly-validated">
<span id="malformed-redirect-urls-from-user-input-not-correctly-validated"></span><h2>Malformed redirect URLs from user input not correctly validated<a class="headerlink" href="#malformed-redirect-urls-from-user-input-not-correctly-validated" title="Permalink to this headline">¶</a></h2>
<p>The validation for redirects did not correctly validate some malformed URLs,
which are accepted by some browsers. This allows a user to be redirected to
an unsafe URL unexpectedly.</p>
<p>Django relies on user input in some cases (e.g.
<a class="reference internal" href="../topics/auth/default.html#django.contrib.auth.views.login" title="django.contrib.auth.views.login"><tt class="xref py py-func docutils literal"><span class="pre">django.contrib.auth.views.login()</span></tt></a>, <tt class="docutils literal"><span class="pre">django.contrib.comments</span></tt>, and
<a class="reference internal" href="../topics/i18n/index.html"><em>i18n</em></a>) to redirect the user to an &#8220;on success&#8221; URL.
The security checks for these redirects (namely
<tt class="docutils literal"><span class="pre">django.utils.http.is_safe_url()</span></tt>) did not correctly validate some malformed
URLs, such as <cite>http:\\\djangoproject.com</cite>, which are accepted by some browsers
with more liberal URL parsing.</p>
<p>To remedy this, the validation in <tt class="docutils literal"><span class="pre">is_safe_url()</span></tt> has been tightened to be able
to handle and correctly validate these malformed URLs.</p>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Django 1.4.13 release notes</a><ul>
<li><a class="reference internal" href="#caches-may-incorrectly-be-allowed-to-store-and-serve-private-data">Caches may incorrectly be allowed to store and serve private data</a></li>
<li><a class="reference internal" href="#malformed-redirect-urls-from-user-input-not-correctly-validated">Malformed redirect URLs from user input not correctly validated</a></li>
</ul>
</li>
</ul>

  <h3>Browse</h3>
  <ul>
    
      <li>Prev: <a href="1.4.14.html">Django 1.4.14 release notes</a></li>
    
    
      <li>Next: <a href="1.4.12.html">Django 1.4.12 release notes</a></li>
    
  </ul>
  <h3>You are here:</h3>
  <ul>
      <li>
        <a href="../index.html">Django 1.7.8.dev20150401230226 documentation</a>
        
          <ul><li><a href="index.html">Release notes</a>
        
        <ul><li>Django 1.4.13 release notes</li></ul>
        </li></ul>
      </li>
  </ul>

  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/releases/1.4.13.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Apr 02, 2015</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="1.4.14.html" title="Django 1.4.14 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.4.12.html" title="Django 1.4.12 release notes">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>